export default class WorkException extends Error {
    public isWork = true;
    public code:number;
    constructor(message:string, code:number = 0) {
        super(message);
        this.code = code;
        this.name = this.constructor.name;
        Error.captureStackTrace(this, this.constructor); // 捕获错误堆栈
      }
}